home *** CD-ROM | disk | FTP | other *** search
/ Leonardo the Inventor / Leonardo The Inventor (93026)(Broderbund)(Riverdeep)(2004).iso / LEOWINMV / DRUMMACH.DIR / 00075_Script_75 < prev    next >
Text File  |  1996-03-18  |  3KB  |  114 lines

  1. on startMovie
  2.   
  3.   global oldVolume
  4.   put the volume of sound 1 into oldVolume  
  5.   
  6.   global currentRhythmLine, currentRhythmName
  7.   put 1 into currentRhythmLine
  8.   updateRhythmName
  9.   
  10.   global BASS_SPRITE, SNARE_SPRITE, HIHAT_SPRITE, CYMBAL1_SPRITE 
  11.   global CYMBAL2_SPRITE, CYMBAL3_SPRITE, TOM1_SPRITE, TOM2_SPRITE, TOM3_SPRITE, 
  12.   
  13.   put 3 into BASS_SPRITE
  14.   put 4 into SNARE_SPRITE
  15.   put 5 into HIHAT_SPRITE
  16.   put 6 into CYMBAL1_SPRITE
  17.   put 7 into CYMBAL2_SPRITE
  18.   put 8 into CYMBAL3_SPRITE
  19.   put 9 into TOM1_SPRITE
  20.   put 10 into TOM2_SPRITE
  21.   put 11 into TOM3_SPRITE
  22.   
  23.   set the immediate of sprite BASS_SPRITE to true
  24.   set the immediate of sprite SNARE_SPRITE to true
  25.   set the immediate of sprite HIHAT_SPRITE to true
  26.   set the immediate of sprite CYMBAL1_SPRITE to true
  27.   set the immediate of sprite CYMBAL2_SPRITE to true
  28.   set the immediate of sprite CYMBAL3_SPRITE to true
  29.   set the immediate of sprite TOM1_SPRITE to true
  30.   set the immediate of sprite TOM2_SPRITE to true
  31.   set the immediate of sprite TOM3_SPRITE to true
  32.   
  33.   put 13 into VOL_UP_BTN
  34.   put 14 into VOL_DOWN_BTN
  35.   put 15 into RHYTHM_BTN
  36.   put 16 into STOP_BTN
  37.   put 17 into POWER_BTN
  38.   
  39.   set the immediate of sprite VOL_UP_BTN to true
  40.   set the immediate of sprite VOL_DOWN_BTN to true
  41.   set the immediate of sprite RHYTHM_BTN to true
  42.   set the immediate of sprite STOP_BTN to true
  43.   set the immediate of sprite POWER_BTN to true
  44.   
  45.   global theVolume
  46.   put 256 into theVolume
  47.   put theVolume into field "Volume"
  48.   set the volume of sound 1 to theVolume
  49. end startMovie
  50.  
  51. on stopMovie
  52.   global oldVolume
  53.   set the volume of sound 1 to oldVolume  
  54. end stopMovie
  55.  
  56. on nextRhythm
  57.   global currentRhythmLine, currentRhythmName
  58.   put currentRhythmLine + 1 into currentRhythmLine
  59.   if currentRhythmLine > the number of lines in field "RhythmList" then put 1 into currentRhythmLine
  60.   updateRhythmName
  61.   go frame "Rhythm"
  62. end nextRhythm
  63.  
  64. on updateRhythmName
  65.   global currentRhythmLine, currentRhythmName 
  66.   put line currentRhythmLine of field "RhythmList" into currentRhythmName
  67.   put currentRhythmName into field "CurrentSequence"
  68. end updateRhythmName
  69.  
  70. on loopRhythm
  71.   if not soundBusy(1) then
  72.     put "Looping"
  73.     go frame "RhythmLoop"
  74.   else
  75.     go the frame
  76.   end if
  77. end loopRhythm
  78.  
  79. on stopRhythm
  80.   sound stop 1
  81.   go "on"
  82. end stopRhythm
  83.  
  84. on playNote aNote
  85.   puppetSound aNote
  86.   go frame aNote
  87. end playNote
  88.  
  89. on raiseVolume
  90.   adjustVolume 32
  91. end raiseVolume
  92.  
  93. on lowerVolume
  94.   adjustVolume -32
  95. end lowerVolume
  96.  
  97. on adjustVolume howMuch
  98.   global theVolume
  99.   put theVolume+howMuch into theVolume
  100.   if theVolume > 256 then put 256 into theVolume
  101.   if thevolume < 16 then put 16 into theVolume
  102.   put theVolume into field "Volume"
  103.   set the volume of sound 1 to theVolume
  104.   if not soundBusy(1) then
  105.     puppetSound "VOLADJ"
  106.   end if
  107. end adjustVolume
  108.  
  109. on turnOn
  110.   waitCursor
  111.   puppetSound "TURN_ON"
  112.   go "TurnOn"
  113.   normalCursor
  114. end turnOn